import { getMedicalOrderDetail } from '@/api/medicine'
import type { MedicalOrderDetail } from '@/types/medicine'
import { ref } from 'vue'

export const useMedicalDetail = (orderId: string) => {
  const medicineOrderDetail = ref({} as MedicalOrderDetail)

  const getMedicalDetail = async () => {
    const res = await getMedicalOrderDetail(orderId)
    medicineOrderDetail.value = res
  }

  getMedicalDetail()

  return {
    medicineOrderDetail,
  }
}
